package com.ehe.common.core.web.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.ToString;

/**
 * 主键为Long型的实体
 * @author jerry
 */
@Getter
@ToString(callSuper = true)
public abstract class LongSuperEntity<T> extends SuperEntity<T, Long> {

    /** 主键 */
    @ApiModelProperty(value = "主键", position = 1)
    @TableId(type = IdType.ID_WORKER)
    private Long id;

    @Override
    public T setId(Long id) {
        this.id = id;
        return (T) this;
    }
}
